package edu.xhu.video.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import edu.xhu.model.video.pojos.BiliVideo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface BiliVideoMapper extends BaseMapper<BiliVideo> {

    /**
     * 根据id,更新video状态
     */
    int updateVideoStatusById(Long videoId, String state);

    /**
     * 获取全部视频id
     *
     * @return
     */
    @Select("SELECT video_id FROM bili_video")
    List<Long> getAllVideoIds();
}
